Add source adapter format-drift smoke tests - #81
Merged
Conversation
This was referenced Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Refs #73
Scope
Adds malformed JSONL and format-drift smoke coverage for the experimental Claude Code and Pi source adapters. This is an independent test-only slice for the source-adapter hardening work.
Implementation summary
src/sources/claude-code.test.tsthat mixes malformed JSON, unsupported record types, accepted user/assistant messages, and attachment-like content.src/sources/pi.test.tsthat mixes malformed JSON, unsupported future events, accepted messages, unsupported tool-call content, and a compaction summary.findSessionsorgetMessagePage, while accepted transcript/session evidence remains searchable.Verification
npx vitest run src/sources/claude-code.test.ts src/sources/pi.test.ts-> passed, 2 files / 20 tests.npm run check-> passed, TypeScript plus 30 files / 205 tests.git diff --check -- src/sources/claude-code.test.ts src/sources/pi.test.ts-> passed.Risk
Low. This PR changes tests only; it does not change parser, source adapter, database, or CLI behavior.
Base branch / dependencies
mainTrace:
request_id: cxs_continue_roadmap_to_completion_20260626T054330Z_api_appendSummary by cubic
Add format-drift smoke tests for
claude-codeandpisource adapters to ensure malformed/unsupported records are skipped and never indexed or shown. This supports Issue #73 by confirming accepted messages stay searchable and sessions render correctly.claude-code: tests mixing malformed JSON, unsupported system records, valid user/assistant messages; verifies no leakage from attachments or bad lines.pi: tests mixing malformed JSON, unsupported future events/tool calls, valid messages, and a compaction summary; verifies only accepted content is searchable.Written for commit bae64c6. Summary will update on new commits.